import get from '@dfeidao/atom-web/local/get';
import fire from '@dfeidao/atom-web/msg/fire';
import error from '@dfeidao/atom-web/msgbox/error';
import { IFeidaoAiBrowserComponent } from '@dfeidao/web/interfaces';
import a001 from './a001';

export default async function a002(fd: IFeidaoAiBrowserComponent) {
	//  保存
	const feild = get(fd, 'feild') as string;

	if (!feild) {
		error('当前无数据，请手动输入！');
		return;
	}
	const comp_id = get(fd, 'comp_id') as string;
	const event_no = get(fd, 'event_no') as string;
	fire(comp_id, event_no, feild);
	// console.log(comp_id, event_no, feild)
	await a001(fd);
}
